package com.HospitalOutpatient.dao;

import com.HospitalOutpatient.entity.User;
import org.apache.ibatis.annotations.*;


@Mapper
public interface UserDao {
    @Select("select * from user where userId = #{userId}")
    User selectUserById(String userId);

    @Select("select * from user where userName = #{userName} and passWord = #{passWord}")
    User selectUserByNameAndWord(User user);

    @Select("select * from user where userName = #{userName}")
    User selectUserByName(String userName);

    int insertUser(User user);

    @Update("update user set userName = #{userName}, passWord = #{passWord} where userId =  #{userId}")
    int updateUser(User user);

    @Delete("delete from user where userId = #{userId}")
    int deleteUser(String userId);


}
